package com.nanjing.east.cloud.domain;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.stereotype.Component;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name="t_pay_order")
@Data
@DynamicInsert
@DynamicUpdate
@EntityListeners({AuditingEntityListener.class})
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PayOrder {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;

    @Column(name="store_id")
    private String storeId;

    @Column(name="pay_order_no")
    private String payOrderNo;

    @Column(name = "outer_order_no")
    private String outerOrderNo;

    @Column(name = "pay_trade_type")
    private String payTradeType;

    @Column(name = "pay_channel_id")
    private Integer payChannelId;

    @Column(name = "pay_amount")
    private String payAmount;

    @Column(name = "pay_result")
    private Integer payResult;

    @Column(name = "pay_response_msg")
    private String payResponseMsg;

    @Column(name = "qr_code")
    private String qrCode;

    @Column(name="create_time")
    private Date createTime;

    @Column(name = "update_time")
    private Date updateTime;

}
